package com.market.goods.dao.mongo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.market.goods.dao.common.MarketGoodsGroup;
import com.market.goods.dao.es.Location;
import lombok.Data;
import lombok.ToString;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.Date;
import java.util.List;

/**
 * 商品详情
 */

@ToString
@Data
@Document(collection="marketGoodsDetails")
public class MarketGoodsDetails {

    @Id
    private String goodsId;

    private List<MarketGoodsGroup> marketGoodsGroups;

    private Location location;

    /**
     * 商品类型id
     */
    private String goodsTypeId;

    /**
     * 商品名称
     */
    private String goodsName;

    /**
     * 店铺地址
     */
    private String address;

    /**
     * 商品图片地址
     */
    private List<String> imageUrls;


    /**
     * 商户id
     */
    private String shopId;

    private String shopName;

    private Integer version;


    @JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss",timezone ="GMT+8")
    private Date createdTime;
    @JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss",timezone ="GMT+8")
    private Date updateTime;

}
